// import { connect } from "react-redux";
import { useSelector, useDispatch } from "react-redux";
function App(props) {
    console.log(props);
    const dispatch = useDispatch();
    const { name } = useSelector((state) => state.aaa);
    const data = useSelector((state) => state);
    console.log("name:", name);
    console.log("data:", data);
    const user = useSelector((state) => state.user);
    console.log(user);

    const add = () => {
        dispatch({
            type: "aaa/add",
            data: 3,
        });
    };
    return (
        <div className="App">
            <button onClick={add}>add</button>
        </div>
    );
}

// export default connect((state) => state)(App);
export default App;
